import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    //存储token,初始为空
    token: ""
  },
  mutations: {
    //设置token的方法
    settoken(state, token) {
      state.token = token;
    }
  },
  actions: {}
});
